package cn.cmcc.intertelecom.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.cmcc.intertelecom.bean.Module;
import cn.cmcc.intertelecom.bean.Msg;
import cn.cmcc.intertelecom.service.ModuleService;

@Controller
public class ModuleController {
	@Autowired
	private ModuleService moduleService;
	
	@ResponseBody
	@RequestMapping(value="/module" , method=RequestMethod.GET)
	public Msg getModule(){
		List<Module> list=moduleService.selectAllModule();
		return Msg.success().add("list", list);
	}
}
